package Triangulation.minimalityMetrics;

import datatypes.Edge;
import datatypes.FaceSet;
import datatypes.Triangle;

public interface MinimalityMetric {	
	/**
	 * Iterates through the edge's trianglesLeft and trianglesRight lists.
	 * Returns true if a pair of triangles satisfying the local minimality criteria has been
	 * found. In that case the 'next' values of the trianglesLeft and trianglesRight lists will
	 * be set to that pair found.
	 * Returns false if no pair satisfying the local minimality criteria exists.
	 * Nota bene: trianglesLeft must be iterated in the outer loop, trianglesRight in the inner loop.
	 * 
	 * @param edge
	 * @param set
	 * @return
	 */
	boolean localMinimumExistsForEdge(Edge edge, FaceSet set);
	boolean edgeIsLocallyMinimal(Edge sharedEdge, Triangle t1, Triangle t2);
	
	/**
	 * Returns the angle used for testing the diamond property (radian value).
	 * Returns negative value if diamond property is not applicable.
	 * @return the angle
	 */
	double getAngleForDiamondProperty();
	
	boolean betaSkeletonApplicable();
	
	/**
	 * Retrieves the name of the metric.
	 * @return The metric name.
	 */
	String getName();
}
